var AudioManager = function()
{
	this.audio = new Array
	
	this.audio[0] = new Audio("Audios/Opening.mp3");
	this.audio[1] = new Audio("Audios/Game.mp3");

	this.update = function()
	{
		if(sceneManager.audio  || !sceneManager.pause)
		{
			if(sceneManager.currentScene == "opening")
			{
				this.audio[0].play();
			}
			else 
				this.audio[0].pause();
				
			if(sceneManager.currentScene == "game")
			{
				this.audio[1].play();
			}
			else 
				this.audio[1].pause();
		}
		
		if(!sceneManager.audio || sceneManager.pause)
		{
			this.audio[0].pause();
			this.audio[1].pause();
		}
	}
	
	this.draw = function()
	{
	
	}
}

var audio = new AudioManager();